<?php

namespace app\admin\validate;

use think\Validate;

class Sorting extends Validate {

	protected $rule = [
		'sname' => 'require|max:25|unique:Sorting,sname,tmp=1',
		'sort' => 'number|between:0,1',
	];

	protected $message = [
		'sname.require' => '请填写分类名称',
		'sname.max' => '分类名称最多只能有25个字符',
		'sname.unique' => '该分类名称已经存在',
		'sort' => '分类排序必须为数字类型',
		'sort.between' => '分类排序必须为小于999的正整数',
	];
}
